<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@page import="dao.NoteDao" import="model.NoteModel" %>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<script type="text/javascript" src='./Js/jquery-2.0.3.min.js'></script>
<script type="text/javascript" src='./Js/msgBox.js'></script>
<script type="text/javascript" src='./Js/main.js'></script>
<script type="text/javascript" src='./Js/detail.js'></script>
<link rel="stylesheet" href="Css/icon/style.css">
<link rel="stylesheet" href="Css/detail.css">
<meta charset="UTF-8">
<meta name="author" content="李华胜<yehong0000@163.com">
<title>便签详情</title>
</head>
<body>
	<%
	request.setCharacterEncoding("utf-8");
	
	NoteDao dao = new NoteDao();
	NoteModel model = new NoteModel();
	model = dao.selectById(Integer.valueOf(request.getParameter("id")));
	
	%>

    <div class="detail-header">每日记录，便签你的生活。</div>
    <div class="detail-main">
        <div class="detail-content">
        <input type="hidden" id="ids" value="<%=model.getId() %>">
            <div id="titleWarp" class="replace" ><%=model.getTitle() %></div>
            <div id="contentWarp" class="replace">
                <%=model.getContent() %>
            </div>
        </div>
    </div>
    <div id="nav">
        <ul>
            <%if((Integer)session.getAttribute("id") == null){%>
            <li><a href="login.jsp" title="登录" class="icon-user-tie"></a></li>
            <%}else{ %>
             <li><a href="ucenter.jsp" title="<%=session.getAttribute("username") %>" ><img id="userhead" src="headerimage/<%=session.getAttribute("headerimage")%>"></a></li>
             <%} %>
            <!-- <li><a href="" title="注册" class="icon-enter"></a></li> -->
            <li><a href="javascript:void();" id="send"  title="新建" class="icon-plus"></a></li>
        </ul>
    </div>
    <div id="choose">
        <div>内容已被改变是否保存？</div>
        <input class="send" id="chooseYes" type="button" value="保存">
        <input class="send" id="chooseNo" type="button" value="取消">
    </div>
    <div id='send-form'>
        <p class='title'><span>添加便签</span><a href="" id='close'></a></p>
        <form action="dodetail.jsp" name="wish" method="post">
            <p>
            <input type="text" placeholder="标题-（可选）" name='title' id='title'/>
            </p>
            <p>
            <textarea name="content" placeholder="内容" id='content'></textarea>
            <label for="content">(您还可以输入&nbsp;<span id='font-num'>50</span>&nbsp;个字)</label>
            </p>
            <span id="send-btn">保存</span>
        </form>
    </div>
    <div id="footer">&copy;2015 "非常5+1"组实习结业设计</div>

</body>
</html>
